﻿using System;
using System.Collections.Generic;
using System.Linq;
using ZX.BLL.Extend;
using ZX.DBModule;
using System.Data;
using DevExpress.XtraReports.UI;
using System.Drawing;
using ZX.DAL.DBExtend;
using ZX.Aspose;

namespace ZX.Web.UI.Controls
{
    public partial class AutoOutputExecl : BasePage
    {
        private int length=0;
        private string[] _field = null;
        private float[] _colWidth = null;
        private string _strEntity = string.Empty;
        private string _strTable = string.Empty;
        private Guid _functionID = Guid.Empty; //所属
        private string _reportName = string.Empty;
        private string _condition = string.Empty;
        private string _customCondition = string.Empty;

        protected void Page_Load(object sender, EventArgs e)
        {
            _strEntity = GetStringFromQueryString("entity", "");
            _functionID = GetGuidFromQueryString("fid");
            _condition = GetStringFromQueryString("condition", "");
            _customCondition = GetStringFromQueryString("customCondition", "");
            SysReport report = new SysReport();
            CreateBussniess(_strEntity);
            if (_bll == null)
            {
                _bll = new BaseBussnies();
            }
            _bll.entity = report;
            _condition = (_condition == "") ? _bll.GetRoleCondition(this.User, _strEntity, _functionID) : "(" + _bll.GetRoleCondition(this.User, _strEntity, _functionID) + ") and (" + _condition + ")";
            _condition = (_condition == "") ? _customCondition : _condition + " and (" + _customCondition + ")";
            _condition = _condition.Replace("()", "(1=1)");
        }


    
    }
}